#include "stdafx.h"
#include "Attack.h"


Attack::Attack(BgpMessage* pMsg, Set<As*>* pWhoToSend) : Msg(pMsg), WhoToSendTo(pWhoToSend)
{
}


Attack::~Attack()
{
}

#include <iostream>
void Attack::PrintAttack()
{
	auto updatedPaths = Msg->UpdatedPaths;
	for (Map<As*, Vector<As*> >::iterator mapIter = updatedPaths->begin(); mapIter != updatedPaths->end(); ++mapIter)
	{
		As* to = mapIter->first;
		Vector<As*> path = mapIter->second;
		std::cout << "The way to - " << mapIter->first->GetName() << ", Is through the Selected Path: ";
		for (Vector<As*>::iterator hopsIter = path.begin(); hopsIter != path.end(); ++hopsIter)
		{
			As* hop = *hopsIter;
			std::cout << hop->GetName() << ' ';
		}
		std::cout << std::endl;
	}
	std::cout << std::endl;
}